import QtQuick 2.0

Rectangle{
    visible: true
    id: loginFrame
    width: parent.width
    height: parent.height


    property bool m_bShowLoginPhoneLogo: false //是否显示移动版LOGO
    property bool m_bShowLoginToolsButton: true // 是否显示桌面版的工具栏

    //服务器设置相关
//    property alias m_loaderSettingPanel: _loaderSetting
    property string m_strSettingPanelType:"Dialog"
    property real m_nSettingPanelWidth: (parent.width<parent.height ? parent.width : parent.height) * 0.7
    property real m_nSettingPanelHeight: m_nSettingPanelWidth * 0.7

    MouseArea {
        anchors.fill: parent
        hoverEnabled: true
        onEntered: {
            loginPanel.otherAreaEvent();
        }
    }

     Component.onCompleted:
     {
         var option = setting.getPlatForm();
         if ( option == 1)
         {
             m_bShowLoginPhoneLogo = false
         }
         else
         {
             m_bShowLoginPhoneLogo = true
         }
     }

    //背景图片
//    Image {
//        id: backgroundImg
//        anchors.fill: parent
//        smooth: true
//        source: setting.m_strLoaderPath + "/loader_bg_Normal.jpg"
//        //loader_bg_Normall.jpg
//    }

    Rectangle {
        id: back
        anchors.fill: parent
        smooth: true
        gradient: Gradient{
            GradientStop {
                color: g_Colors.m_cLoginPanelBackground//"#DDE6ED"
                position: 0.0
            }
            GradientStop {
                color:"#DDE6ED" //g_Colors.m_cLoginPanelBackground
                position: 1.0
            }
        }
    }
    //logo图片-左上角
    Image {
        id: logo
        x: parent.width * 0.02
        y: parent.height * 0.02
        width: parent.width * 0.2
        height:  parent.height * 0.14
        visible: !m_bShowLoginPhoneLogo
        smooth: true
        fillMode: Image.PreserveAspectFit
        source: setting.m_strLoaderPath + "/loader_Logo_Normal.png"
    }

    //log--移动版logo
    Image
    {
        id:_logoImage
        width: parent.width*0.6
        height:width*0.42
        visible: m_bShowLoginPhoneLogo
        smooth:true
        anchors.horizontalCenter: parent.horizontalCenter
        anchors.top: parent.top
        anchors.topMargin:parent.height*0.20
        source: setting.m_strLoaderPath + "/logoImage_Normal.png"
    }

    LQLoadToolsPanel {
        id: loaderToolsPanel
    }

    LQLoginPanel {
        id: loginPanel

        onSignalLogin: {
//            signalLogin()
            console.log("login")
        }
    }
}
